﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="MyProfiles.aspx.cs" Inherits="MyProfiles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <link href="js/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.validationEngine.js" type="text/javascript"></script>
    <script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
    <link rel="stylesheet" href="jquery/jRating.jquery.css" type="text/css" />
    <script type="text/javascript" src="jquery/jRating.jquery.js"></script>
    <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jchartfx.system.js"></script>
    <script type="text/javascript" src="js/jchartfx.coreBasic.js"></script>
    <link href="Styles/jchartfx.css" rel="stylesheet" type="text/css" />
    <script src="js/jchartfx.coreVector.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jchartfx.advanced.js"></script>
    <script src="js/jchartfx.animation.js" type="text/javascript"></script>
    <script src="js/jchartfx.annotation.js" type="text/javascript"></script>
    <link href="jquery/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="js/jquery-ui.js" type="text/javascript"></script>
    <script src="js/Recipes.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/rgbcolor.js"></script> 
    <script type="text/javascript" src="js/StackBlur.js"></script>
    <script type="text/javascript" src="js/canvg.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#content1").hide();
            $("#content2").hide();
            $("#content3").hide();
            $("#content4").hide();
            var Check = 'Food';
            var StatusGoals = 'false';
            var CalorieValue = '';
            var CarbValue = '';
            var FatValue = '';
            var ProteinValue = '';
            var WeightValue = '';
            var RecipeID = '';

            var $datepicker = $(".datepicker");
            $datepicker.datepicker();
            $.datepicker.setDefaults({ dateFormat: 'D, M d, yy' });
            $datepicker.datepicker('setDate', new Date());

            $('.Next').click(function () {
                var nextdate = $('.datepicker').datepicker('getDate', +1);
                nextdate.setDate(nextdate.getDate() + 1);
                $('.datepicker').datepicker('setDate', nextdate);
                var now = new Date($('#datepicker').val());
                var Month = now.getMonth();
                var Day = now.getDate();
                var Year = now.getFullYear();
                if (Check == 'Food') {
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {

                    $("#ChartDiv1").empty();
                    loadReportExercise();

                }
                else if (Check == 'Weight') {
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                ShowMainReport();
            });

            $('.Back').click(function () {
                var backdate = $('.datepicker').datepicker('getDate', -1);
                backdate.setDate(backdate.getDate() - 1);
                $('.datepicker').datepicker('setDate', backdate);
                var now = new Date($('#datepicker').val());
                var Month = now.getMonth();
                var Day = now.getDate();
                var Year = now.getFullYear();
                if (Check == 'Food') {
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {

                    $("#ChartDiv1").empty();
                    loadReportExercise();

                }
                else if (Check == 'Weight') {
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                ShowMainReport();
            });

            $('#datepicker').datepicker(); // Initialise

            $('#datepicker').datepicker('option', {
                onClose: function () {
                    if (Check == 'Food') {
                        $("#ChartDiv1").empty();
                        loadReport1();
                    }
                    else if (Check == 'Exercise') {

                        $("#ChartDiv1").empty();
                        loadReportExercise();

                    }
                    else if (Check == 'Weight') {
                        $("#ChartDiv1").empty();
                        loadReportWeight();
                    }
                    ShowMainReport();
                }
            });

            ShowMainReport();

            loadReport1();

            $(function () {
                $(".datepicker").datepicker();
            });

            BindGrahpSuggestion('<%=Session["Userid"]%>');


            $('.txtWeightLbs').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtExerciseCal').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });
            $('.txtQuantity').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if (event.which < 48 || event.which > 57) {
                    event.preventDefault();
                }
            });

            $('.txtMyCALORIES').keypress(function (event) {


                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtMyFAT').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtMyPROTEIN').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.txtMyCARB').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });
            $('.txtMYExercise').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });
            $('.txtMyWeight').keypress(function (event) {

                if (event.which == 0 || event.which == 8 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46) {
                    return true;
                } else if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
                    event.preventDefault();
                }
            });

            $('.food3').attr('src', 'images/food4.png');
            $('.runing3').attr('src', 'images/runing3.png');
            $('.weight3').attr('src', 'images/weight3.png');

            var colorOrig = $(".Food").css('background-color');
            var colorGoalOrig = $(".txExerciseGoals").css('background-color');
            $("#idFood").css('background-color', '#375D10');
            $(".lblFood").css('color', '#ffffff');
            $(".txtCalGoals").css('color', '#ffffff');
            $(".txtFatGoals").css('color', '#ffffff');
            $(".txtCarbGoals").css('color', '#ffffff');
            $(".txtProteinGoals").css('color', '#ffffff');
            $(".txtMyIntakeCal").css('color', '#ffffff');
            $(".txtMyIntakeFat").css('color', '#ffffff');
            $(".txtMyIntakeCarb").css('color', '#ffffff');
            $(".txtMyIntakeProtein").css('color', '#ffffff');

            $(".txtCalGoals").css('background-color', '#375D10');
            $(".txtFatGoals").css('background-color', '#375D10');
            $(".txtCarbGoals").css('background-color', '#375D10');
            $(".txtProteinGoals").css('background-color', '#375D10');
            $(".txtMyIntakeCal").css('background-color', '#375D10');
            $(".txtMyIntakeFat").css('background-color', '#375D10');
            $(".txtMyIntakeCarb").css('background-color', '#375D10');
            $(".txtMyIntakeProtein").css('background-color', '#375D10');
            $("#idtxtCalGoals").css('background-color', '#375D10');
            $("#idtxtFatGoals").css('background-color', '#375D10');
            $("#idtxtCarbGoals").css('background-color', '#375D10');
            $("#idtxtProteinGoals").css('background-color', '#375D10');
            $("#idtxtMyIntakeCal").css('background-color', '#375D10');
            $("#idtxtMyIntakeFat").css('background-color', '#375D10');
            $("#idtxtMyIntakeCarb").css('background-color', '#375D10');
            $("#idtxtMyIntakeProtein").css('background-color', '#375D10');
            $(".Food").click(function () {
                Check = 'Food';
                $('.food3').attr('src', 'images/food4.png');
                $('.runing3').attr('src', 'images/runing3.png');
                $('.weight3').attr('src', 'images/weight3.png');

                $(this).css('background-color', '#375D10');
                $(".Weight").css('background-color', colorOrig);
                $(".Exercise").css('background-color', colorOrig);
                $(".lblFood").css('color', '#ffffff');
                $(".lblWeight").css('color', "#000000");
                $(".lblExercise").css('color', "#000000");
                $(".txWeightGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeWeight").css('background-color', colorGoalOrig);
                $(".txExerciseGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeExercise").css('background-color', colorGoalOrig);
                $(".txExerciseGoals").css('color', '#000000');
                $(".txtMyIntakeExercise").css('color', '#000000');
                $(".txWeightGoals").css('color', '#000000');
                $(".txtMyIntakeWeight").css('color', '#000000');

                $(".txtCalGoals").css('color', '#ffffff');
                $(".txtFatGoals").css('color', '#ffffff');
                $(".txtCarbGoals").css('color', '#ffffff');
                $(".txtProteinGoals").css('color', '#ffffff');
                $(".txtMyIntakeCal").css('color', '#ffffff');
                $(".txtMyIntakeFat").css('color', '#ffffff');
                $(".txtMyIntakeCarb").css('color', '#ffffff');
                $(".txtMyIntakeProtein").css('color', '#ffffff');

                $(".txtCalGoals").css('background-color', '#375D10');
                $(".txtFatGoals").css('background-color', '#375D10');
                $(".txtCarbGoals").css('background-color', '#375D10');
                $(".txtProteinGoals").css('background-color', '#375D10');
                $(".txtMyIntakeCal").css('background-color', '#375D10');
                $(".txtMyIntakeFat").css('background-color', '#375D10');
                $(".txtMyIntakeCarb").css('background-color', '#375D10');
                $(".txtMyIntakeProtein").css('background-color', '#375D10');
                $("#idtxtCalGoals").css('background-color', '#375D10');
                $("#idtxtFatGoals").css('background-color', '#375D10');
                $("#idtxtCarbGoals").css('background-color', '#375D10');
                $("#idtxtProteinGoals").css('background-color', '#375D10');
                $("#idtxtMyIntakeCal").css('background-color', '#375D10');
                $("#idtxtMyIntakeFat").css('background-color', '#375D10');
                $("#idtxtMyIntakeCarb").css('background-color', '#375D10');
                $("#idtxtMyIntakeProtein").css('background-color', '#375D10');

                $("#idtxWeightGoals").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeWeight").css('background-color', colorGoalOrig);
                $("#idtxExerciseGoals").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeExercise").css('background-color', colorGoalOrig);

                $("#ChartDiv1").empty();
                loadReport1();
            });

            $(".Exercise").click(function () {
                Check = 'Exercise';
                $('.food3').attr('src', 'images/food3.png');
                $('.runing3').attr('src', 'images/runing4.png');
                $('.weight3').attr('src', 'images/weight3.png');
                $(this).css('background-color', '#375D10');
                $(".Food").css('background-color', colorOrig);
                $(".Weight").css('background-color', colorOrig);
                $(".lblFood").css('color', '#000000');
                $(".lblWeight").css('color', "#000000");
                $(".lblExercise").css('color', "#ffffff");
                $(".txExerciseGoals").css('background-color', '#375D10');
                $(".txtMyIntakeExercise").css('background-color', '#375D10');
                $(".txExerciseGoals").css('color', '#ffffff');
                $(".txtMyIntakeExercise").css('color', '#ffffff');
                $(".txWeightGoals").css('color', '#000000');
                $(".txtMyIntakeWeight").css('color', '#000000');
                $(".txWeightGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeWeight").css('background-color', colorGoalOrig);

                $(".txtCalGoals").css('color', '#000000');
                $(".txtFatGoals").css('color', '#000000');
                $(".txtCarbGoals").css('color', '#000000');
                $(".txtProteinGoals").css('color', '#000000');
                $(".txtMyIntakeCal").css('color', '#000000');
                $(".txtMyIntakeFat").css('color', '#000000');
                $(".txtMyIntakeCarb").css('color', '#000000');
                $(".txtMyIntakeProtein").css('color', '#000000');

                $(".txtCalGoals").css('background-color', colorGoalOrig);
                $(".txtFatGoals").css('background-color', colorGoalOrig);
                $(".txtCarbGoals").css('background-color', colorGoalOrig);
                $(".txtProteinGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCal").css('background-color', colorGoalOrig);
                $(".txtMyIntakeFat").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCarb").css('background-color', colorGoalOrig);
                $(".txtMyIntakeProtein").css('background-color', colorGoalOrig);

                $("#idtxtCalGoals").css('background-color', colorGoalOrig);
                $("#idtxtFatGoals").css('background-color', colorGoalOrig);
                $("#idtxtCarbGoals").css('background-color', colorGoalOrig);
                $("#idtxtProteinGoals").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeCal").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeFat").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeCarb").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeProtein").css('background-color', colorGoalOrig);
                $("#idtxWeightGoals").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeWeight").css('background-color', colorGoalOrig);
                $("#idtxExerciseGoals").css('background-color', '#375D10');
                $("#idtxtMyIntakeExercise").css('background-color', '#375D10');
                $("#ChartDiv1").empty();

                loadReportExercise();
            });

            $(".Weight").click(function () {
                Check = 'Weight';
                $('.food3').attr('src', 'images/food3.png');
                $('.runing3').attr('src', 'images/runing3.png');
                $('.weight3').attr('src', 'images/weight4.png');
                $(this).css('background-color', '#375D10');
                $(".Food").css('background-color', colorOrig);
                $(".Exercise").css('background-color', colorOrig);
                $(".lblFood").css('color', '#000000');
                $(".lblWeight").css('color', "#ffffff");
                $(".lblExercise").css('color', "#000000");
                $(".txWeightGoals").css('background-color', '#375D10');
                $(".txtMyIntakeWeight").css('background-color', '#375D10');
                $(".txWeightGoals").css('color', '#ffffff');
                $(".txtMyIntakeWeight").css('color', '#ffffff');
                $(".txExerciseGoals").css('color', '#000000');
                $(".txtMyIntakeExercise").css('color', '#000000');
                $(".txExerciseGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeExercise").css('background-color', colorGoalOrig);
                $(".txtCalGoals").css('color', '#000000');
                $(".txtFatGoals").css('color', '#000000');
                $(".txtCarbGoals").css('color', '#000000');
                $(".txtProteinGoals").css('color', '#000000');
                $(".txtMyIntakeCal").css('color', '#000000');
                $(".txtMyIntakeFat").css('color', '#000000');
                $(".txtMyIntakeCarb").css('color', '#000000');
                $(".txtMyIntakeProtein").css('color', '#000000');

                $(".txtCalGoals").css('background-color', colorGoalOrig);
                $(".txtFatGoals").css('background-color', colorGoalOrig);
                $(".txtCarbGoals").css('background-color', colorGoalOrig);
                $(".txtProteinGoals").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCal").css('background-color', colorGoalOrig);
                $(".txtMyIntakeFat").css('background-color', colorGoalOrig);
                $(".txtMyIntakeCarb").css('background-color', colorGoalOrig);
                $(".txtMyIntakeProtein").css('background-color', colorGoalOrig);

                $("#idtxtCalGoals").css('background-color', colorGoalOrig);
                $("#idtxtFatGoals").css('background-color', colorGoalOrig);
                $("#idtxtCarbGoals").css('background-color', colorGoalOrig);
                $("#idtxtProteinGoals").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeCal").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeFat").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeCarb").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeProtein").css('background-color', colorGoalOrig);

                $("#idtxWeightGoals").css('background-color', '#375D10');
                $("#idtxtMyIntakeWeight").css('background-color', '#375D10');
                $("#idtxExerciseGoals").css('background-color', colorGoalOrig);
                $("#idtxtMyIntakeExercise").css('background-color', colorGoalOrig);

                $("#ChartDiv1").empty();
                loadReportWeight();
            });


            $('#idAddExercise').click(function () {
                InserReportExercises()
            });

            $('#idAddWeight').click(function () {
                InserReportWeights()
            });

            $('#idAddFoodDrink').click(function () {
                InsertReportFoodDrink(CalorieValue, FatValue, CarbValue, ProteinValue, RecipeID)
            });

            $('#btnMyGoals').click(function () {
                $(".EnterGoals").show();
                $(".Main").hide();
                var src = $('.btnMyGoals').attr('src');
                if (src == 'images/AddReports.png') {
                    $('.btnAddGoals').attr('src', 'images/AddReports.png');
                    $("#txtMyCALORIES").val($("#txtCalGoals").val());
                    $("#txtMyFAT").val($("#txtFatGoals").val());
                    $("#txtMyCARB").val($("#txtCarbGoals").val());
                    $("#txtMyPROTEIN").val($("#txtProteinGoals").val());
                    $("#txtMYExercise").val($("#txExerciseGoals").val());
                    $("#txtMyWeight").val($("#txWeightGoals").val());
                    //$("#datepickerGoal").val($(".datepicker").val())
                }
                else {
                    $('.btnAddGoals').attr('src', 'images/EditReports.png');
                    $("#txtMyCALORIES").val($("#txtCalGoals").val());
                    $("#txtMyFAT").val($("#txtFatGoals").val());
                    $("#txtMyCARB").val($("#txtCarbGoals").val());
                    $("#txtMyPROTEIN").val($("#txtProteinGoals").val());
                    $("#txtMYExercise").val($("#txExerciseGoals").val());
                    $("#txtMyWeight").val($("#txWeightGoals").val());
                    //$("#datepickerGoal").val($(".datepicker").val());
                    // $("#datepickerGoal").prop('disabled', true);
                }
            });
            $('.btnAddGoals').click(function () {
                var src = $('.btnAddGoals').attr('src');
                if (src == 'images/AddReports.png') {
                    InsertReportGoals();
                }
                else {

                    EditReportGoals();
                }
            });

            $('.Accept').click(function () {
                if (Check == 'Food') {
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {

                    $("#ChartDiv1").empty();
                    loadReportExercise();

                }
                else if (Check == 'Weight') {
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                ShowMainReport();
            });

            $('#btnMyEnter').click(function () {
                if (Check == 'Food') {
                    ListMyFoodIntake();
                    $(".EnterFoodInTakes").show();
                }
                else if (Check == 'Exercise') {

                    ListMyExercises();
                    $(".EnterExercise").show();

                }
                else if (Check == 'Weight') {
                    ListMyWeight();
                    $(".EnterWeight").show();
                }
                $(".Main").hide();
            });

            $('.alert-close-goals').on('click', function (c) {
                if ($("#txtMyCALORIES").val() == "") {
                    $("#txtMyCALORIES").focus();
                }
                else if ($("#txtMyFAT").val() == "") {
                    $("#txtMyFAT").focus();
                }
                else if ($("#txtMyCARB").val() == "") {
                    $("#txtMyCARB").focus();
                }
                else if ($("#txtMyPROTEIN").val() == "") {
                    $("#txtMyPROTEIN").focus();
                }
                else if ($("#txtMYExercise").val() == "") {
                    $("#txtMYExercise").focus();
                }
                else if ($("#txtMyWeight").val() == "") {
                    $("#txtMyWeight").focus();
                }
                else {
                    var src = $('.btnMyGoals').attr('src');
                    if (src == 'images/AddReports.png') {
                        $("#txtCalGoals ").val($("#txtMyCALORIES").val());
                        $("#txtFatGoals").val($("#txtMyFAT").val());
                        $("#txtCarbGoals").val($("#txtMyCARB").val());
                        $("#txtProteinGoals").val($("#txtMyPROTEIN").val());
                        $("#txExerciseGoals").val($("#txtMYExercise").val());
                        $("#txWeightGoals").val($("#txtMyWeight").val());
                        InsertReportGoals();
                    }
                    else {
                        $("#txtCalGoals ").val($("#txtMyCALORIES").val());
                        $("#txtFatGoals").val($("#txtMyFAT").val());
                        $("#txtCarbGoals").val($("#txtMyCARB").val());
                        $("#txtProteinGoals").val($("#txtMyPROTEIN").val());
                        $("#txExerciseGoals").val($("#txtMYExercise").val());
                        $("#txWeightGoals").val($("#txtMyWeight").val());
                        EditReportGoals();
                    }
                    $(".EnterGoals").hide();
                    $(".Main").show();

                    if (Check == 'Food') {
                        $("#ChartDiv1").empty();
                        loadReport1();
                    }
                    else if (Check == 'Exercise') {

                        $("#ChartDiv1").empty();
                        loadReportExercise();

                    }
                    else if (Check == 'Weight') {
                        $("#ChartDiv1").empty();
                        loadReportWeight();
                    }
                }
            });

            $('.alert-close').on('click', function (c) {

                if (Check == 'Food') {
                    $(".EnterFoodInTakes").hide();
                    $("#ChartDiv1").empty();
                    loadReport1();
                }
                else if (Check == 'Exercise') {
                    $(".EnterExercise").hide();
                    $("#ChartDiv1").empty();
                    loadReportExercise();
                }
                else if (Check == 'Weight') {
                    $(".EnterWeight").hide();
                    $("#ChartDiv1").empty();
                    loadReportWeight();
                }
                $(".Main").show();
                ShowMainReport();
            });
            //-----------Start suggestReport---------------------
            $(".suggestReport").autocomplete({
                close: function () {
                    var userid = '<%=Session["Userid"]%>';
                    var RecipeName = replaceAll("'", ",,", $("#<%=txtFoodDrink.ClientID%>").val());

                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/GetUnitReport",
                        data: "{'UserId':'" + userid + "','RecipeName':'" + RecipeName + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (result) {
                            var Unitreport = eval(result.d);
                            var options = '';
                            $.each(Unitreport, function () {
                                options += '<option>' + this.Msre_Desc + '</option>';

                            });
                            $("#ddlUnit").html(options);
                            $("#<%=txtQuantity.ClientID%>").val("1");
                            var UnitName = ($("#ddlUnit").val());
                            if ((RecipeName != '' || RecipeName != null) && (UnitName != '' || UnitName != null())) {
                                $.ajax({
                                    type: "POST",
                                    url: "PIMService.asmx/GetCurrentNutrient",
                                    data: "{'UserId':'" + userid + "','RecipeName':'" + RecipeName + "','UnitName':'" + UnitName + "'}",
                                    contentType: "application/json; charset=utf-8",
                                    dataType: "json",
                                    success: function (result1) {
                                        $.each(eval(result1.d), function () {
                                            CalorieValue = this.Cal;
                                            CarbValue = this.Carb;
                                            FatValue = this.Fat;
                                            ProteinValue = this.Protein;
                                            WeightValue = this.Weight;
                                            RecipeID = this.RecipeID;
                                        });
                                    },

                                    error: function (result) {

                                    }
                                });

                            }

                        },
                        error: function (result) {

                        }

                    });

                }
            });
            //-----------End suggestReport---------------------

        });

        //--------------------------Start Function ListMyExercises--------------------------------
        function ListMyExercises() {
            var userid = '<%=Session["Userid"]%>';
            $("#idListEnterExercise > tbody:last").children().remove();
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetListMyExercises",
                    data: "{'UserId':'" + userid + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {

                            if (data.d[i].Rank == '1') {
                                $("#idListEnterExercise").append("<tr style='background-color:#A5A6A5;font-weight:bold;height:40px;font-weight:normal;'><td colspan='3' class='flip'>&nbsp;&nbsp;&nbsp;" + data.d[i].Header + "</td></tr>");
                            }
                            $("#idListEnterExercise").append("<tr style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; border-style: solid; border-width: 1px 0px 1px 0px;height:40px;font-weight:normal;'><td>" + data.d[i].ExerciseName + "</td><td>" + data.d[i].Cal +
                             "&nbsp;Cals</td><td align='right'>" + '<a href="#"><img id="' + data.d[i].ID + '" name="' + data.d[i].ExerciseName + '" src="images/DeleteReports.png" onclick="javascript:DeleteReportExercises(this)" class="trigger"/></a>' + "</td></tr>");

                        }

                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function ListMyExercises--------------------------------
        //--------------------------Start Function ListMyWeight--------------------------------
        function ListMyWeight() {
            var userid = '<%=Session["Userid"]%>';
            $("#idListEnterWeight > tbody:last").children().remove();
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetListMyWeight",
                    data: "{'UserId':'" + userid + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {

                            if (data.d[i].Rank == '1') {
                                $("#idListEnterWeight").append("<tr style='background-color:#A5A6A5;font-weight:bold;height:40px;font-weight:normal;'><td colspan='2' class='flip'>&nbsp;&nbsp;&nbsp;" + data.d[i].Header + "</td></tr>");
                            }
                            $("#idListEnterWeight").append("<tr style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; border-style: solid; border-width: 1px 0px 1px 0px;height:40px;font-weight:normal;'><td>" + data.d[i].Weight +
                             "&nbsp;lbs</td><td align='right'>" + '<a href="#"><img id="' + data.d[i].ID + '" name="Weight ' + data.d[i].ID + '" src="images/DeleteReports.png" onclick="javascript:DeleteReportWeight(this)" class="trigger1"/></a>' + "</td></tr>");

                        }

                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function ListMyWeight--------------------------------
        //--------------------------Start Function ListMyFoodIntake--------------------------
        function ListMyFoodIntake() {
            var userid = '<%=Session["Userid"]%>';
            $("#idListFoodIntake > tbody:last").children().remove();
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetListMyFoodIntake",
                    data: "{'UserId':'" + userid + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {

                            if (data.d[i].Rank == '1') {
                                $("#idListFoodIntake").append("<tr style='background-color:#A5A6A5;font-weight:bold;font-weight:normal;'><td colspan='6' class='flip'>&nbsp;&nbsp;&nbsp;" + data.d[i].Header + "</td></tr>"); 
                            }
                            $("#idListFoodIntake").append("<tr style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; border-style: solid; border-width: 1px 0px 1px 0px;;height:40px;font-weight:normal;'><td>" + data.d[i].CalorieName +
                            "</td><td>&nbsp;&nbsp;" + data.d[i].Calorie + "</td><td>&nbsp;&nbsp;" + data.d[i].Fat + "</td><td>&nbsp;&nbsp;" + data.d[i].Carb + "</td><td>&nbsp;&nbsp;" + data.d[i].Protein +
                             "</td><td align='right'>" + '<a href="#"><img id="' + data.d[i].ID + '" name="' + data.d[i].CalorieName + '" src="images/DeleteReports.png" onclick="javascript:DelteReportFoodDrink(this)" class="trigger"/></a>' + "</td></tr>");

                        }

                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function ListMyFoodIntake-----------------------------
       
        //--------------------------Start Function loadReport1--------------------------
        function loadReport1() {
            var userid = '<%=Session["Userid"]%>';
            var a1 = new Array();
            var chart1;
            //var chartTemp;
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetReport2",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var report1 = eval(response.d);
                        $.each(report1, function () {
                            var b1 = new Object();
                            b1.Name = this.Name;
                            b1.Calorie = this.Calorie;
                            b1.Carb = this.Carb;
                            b1.Fat = this.Fat;
                            b1.Protein = this.Protein;
                            a1.push(b1);
                        });
                        chart1 = new cfx.Chart();
                        chart1.getAnimations().getLoad().setEnabled(true);
                        chart1.setDataSource(a1);
                        var pane = new cfx.Pane();
                        chart1.getPanes().add(pane);
                        chart1.setGallery(cfx.Gallery.Lines);
                        chart1.getSeries().getItem(0).setPane(chart1.getPanes().getItem(1));
                        chart1.getSeries().getItem(1).setPane(chart1.getPanes().getItem(0));
                        chart1.getSeries().getItem(2).setPane(chart1.getPanes().getItem(0));
                        chart1.getSeries().getItem(3).setPane(chart1.getPanes().getItem(0));                   
                        chart1.getSeries().getItem(0).setGallery(cfx.Gallery.Bar);
                        chart1.getLegendBox().setVisible(true);
                        chart1.getAxisX().setLabelAngle(90);
                        var chartDiv = document.getElementById('ChartDiv1');
                        chart1.create(chartDiv);

                        //var img = document.getElementById('dstImg');
                        //chart2Img(chartTemp, img);
                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function loadReport1--------------------------
        function chart2Img(chart, img) {
            var svgH = chart.S.parentNode.innerHTML;
            svgH = svgH.slice(svgH.indexOf('<svg'));
            if ((p = svgH.indexOf('<div')) > 0)
                svgH = svgH.slice(0, p);
            svgH = svgH.replace(/sfxid=/g, ' sfxid=');
            svgH = svgH.replace(/sfxtitle=/g, ' sfxtitle=');
            $('.test').val(svgH);
            var canvas = document.createElement('canvas');
            canvg(canvas, svgH);
            var imgData = canvas.toDataURL('image/png');
            img.src = imgData;
        }
        //--------------------------Start Function loadReportWeight--------------------------
        function loadReportWeight() {
            var userid = '<%=Session["Userid"]%>';
            var a4 = new Array();
            var chart4;
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetReportWeight",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var report1 = eval(response.d);
                        $.each(report1, function () {
                            var b4 = new Object();
                            b4.Name = this.Name;
                            b4.YourWeight = this.YourWeight;
                            b4.Target = this.Target;
                            a4.push(b4);
                        });
                        chart4 = new cfx.Chart();
                        chart4.getAnimations().getLoad().setEnabled(true);
                        chart4.getAxisX().setLabelAngle(90);
                        chart4.setGallery(cfx.Gallery.Lines);
                        chart4.setDataSource(a4);
                        var divHolder3 = document.getElementById('ChartDiv1');
                        chart4.create(divHolder3);
                        chart4.getSeries().getItem(0).setText("Your Weight");
                        chart4.getSeries().getItem(1).setText("Target");
                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------End Function loadReportWeight--------------------------
        //--------------------------Start Function loadReportExercise-----------------
        function loadReportExercise() {
            var userid = '<%=Session["Userid"]%>';
            var a3 = new Array();
            var chart3;
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetReportExercise",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (response) {
                        var report1 = eval(response.d);
                        $.each(report1, function () {
                            var b3 = new Object();
                            b3.Name = this.Name;
                            b3.YourExercise = this.YourExercise;
                            b3.Target = this.Target;
                            a3.push(b3);
                        });
                        chart3 = new cfx.Chart();
                        chart3.getAnimations().getLoad().setEnabled(true);
                        chart3.setGallery(cfx.Gallery.Lines);

                        chart3.getAxisX().setLabelAngle(90);
                        chart3.setDataSource(a3);
                        var divHolder3 = document.getElementById('ChartDiv1');
                        chart3.create(divHolder3);
                        chart3.getSeries().getItem(0).setText("Your Exercise");
                        chart3.getSeries().getItem(1).setText("Target");
                    },
                    error: function (msg) {

                    }
                });
            }
        }
        //--------------------------Start Function loadReportExercise-----------------
        //--------------------------Start Function InserReportExercises-----------------
        function InserReportExercises() {

            if ($("#<%=txtExerciseName.ClientID%>").val() == "") {
                $("#<%=txtExerciseName.ClientID%>").focus();
            }
            else if ($("#<%=txtExerciseCal.ClientID%>").val() == "") {
                $("#<%=txtExerciseCal.ClientID%>").focus();
            }
            else if ($("#datepickerExercise").val() == "") {
                $("#datepickerExercise").focus();
            }
            else {
                var userid = '<%=Session["Userid"]%>';
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InserReportExercises",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($("#datepickerExercise").val()) + "','_ExerciseName':'" + $("#<%=txtExerciseName.ClientID%>").val() + "','_Cal':'" + $("#<%=txtExerciseCal.ClientID%>").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        ListMyExercises();
                        $("#<%=txtExerciseName.ClientID%>").val('');
                        $("#<%=txtExerciseCal.ClientID%>").val('');
                      
                    },
                    error: function (result) {
                        alert('Can not create your exercise!');
                    }
                });
            }
        }
        //--------------------------End Function InserReportExercises-----------------
        //--------------------------Start Function DeleteReportExercises-----------------
        function DeleteReportExercises(obj) {
            var id = $(obj).attr('id');
            var name = $(obj).attr('name');
            var userid = '<%=Session["Userid"]%>';
            var answer = confirm('Are you sure you want to delete the exercise name: ' + name + '?');
            if (answer) {
                if (userid != null || userid != "") {
                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/DeleteReportExercises",
                        data: "{'UserId':'" + userid + "','ID':'" + id + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {
                            ListMyExercises();
                        },
                        error: function (msg) {
                            alert('Can not delete your exercise!');
                        }
                    });
                }
            } 
            else {

                alert(name);
            }
        }
        //--------------------------End Function DeleteReportExercises-----------------
        //--------------------------Start Function InserReportWeights-----------------
        function InserReportWeights() {

            if ($("#<%=txtWeightLbs.ClientID%>").val() == "") {
                $("#<%=txtWeightLbs.ClientID%>").focus();
            }
            else if ($("#datepickerWeight").val() == "") {
                $("#datepickerWeight").focus();
            }
            else {
                var userid = '<%=Session["Userid"]%>';
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InserReportWeights",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($("#datepickerWeight").val()) + "','_Weight':'" + $("#<%=txtWeightLbs.ClientID%>").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        if (result.d == '10') {
                            alert('This weight is already in system on ' + $("#datepickerWeight").val());
                        }
                        else {
                            ListMyWeight();
                            $("#<%=txtWeightLbs.ClientID%>").val('');
                        }
                    },
                    error: function (result) {
                        alert('Can not create your weight!');
                    }
                });
            }
        }
        //--------------------------End Function InserReportWeights-----------------
        //--------------------------Start Function DeleteReportWeight-----------------
        function DeleteReportWeight(obj) {
            var id = $(obj).attr('id');
            var name = $(obj).attr('name');
            var userid = '<%=Session["Userid"]%>';
            var answer = confirm('Are you sure you want to delete the weight?');
            if (answer) {
                if (userid != null || userid != "") {
                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/DeleteReportWeights",
                        data: "{'UserId':'" + userid + "','ID':'" + id + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {
                            ListMyWeight();
                        },
                        error: function (msg) {
                            alert('Can not delete your weight!');
                        }
                    });
                }
            }
            else {

                alert(name);
            }
        }
        //--------------------------End Function DeleteReportWeight-----------------
        //--------------------------Start Function InsertReportFoodDrink---------------
        function InsertReportFoodDrink(CalorieValue, FatValue, CarbValue, ProteinValue, RecipeID) {

            var userid = '<%=Session["Userid"]%>';
            
            if ($("#<%=txtFoodDrink.ClientID%>").val() == "") {
                $("#<%=txtFoodDrink.ClientID%>").focus();
            }
            else if ($("#<%=txtQuantity.ClientID%>").val() == "") {
                $("#<%=txtQuantity.ClientID%>").focus();
            }
            else if ($("#ddlUnit").val() == "") {
                $("#ddlUnit").val().focus();
            }
            else if ($("#datepickerFoodDrink").val() == "") {
                $("#datepickerFoodDrink").focus();
            }
            else {
                var RecipeName = replaceAll("'", ",,", $("#<%=txtFoodDrink.ClientID%>").val()); 
                            
                var Quantity = $("#<%=txtQuantity.ClientID%>").val();           
                var UnitName = $("#ddlUnit").val().replace("'", ",,");
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InsertReportFoodDrink",
                    data: "{'_UserID':'" + userid + "','_CalorieName':'" + RecipeName + "','_Calorie':'" + CalorieValue + "','_Fat':'" + FatValue
                     + "','_Carb':'" + CarbValue + "','_Protein':'" + ProteinValue + "','_Quantity':'" + Quantity + "','_Unit':'" + UnitName
                     + "','_Date':'" + getformatdate($("#datepickerFoodDrink").val()) + "','_RecipeID':'" + RecipeID + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        ListMyFoodIntake();
                        $("#<%=txtFoodDrink.ClientID%>").val("");
                        $("#<%=txtQuantity.ClientID%>").val("");
                        $("#ddlUnit").empty();
                    },
                    error: function (result) {
                        alert('Can not create a eating or drinking!');
                    }
                });

            }
        }
        //--------------------------End Function InsertReportFoodDrink-----------------
        //--------------------------Start Function DelteReportFoodDrink-------------
        function DelteReportFoodDrink(obj) {
            var id = $(obj).attr('id');
            var name = $(obj).attr('name');
            var userid = '<%=Session["Userid"]%>';
            var answer = confirm('Are you sure you want to delete the recipe name: ' + name + '?');
            if (answer) {
                if (userid != null || userid != "") {
                    $.ajax({
                        type: "POST",
                        url: "PIMService.asmx/DelteReportFoodDrink",
                        data: "{'UserId':'" + userid + "','ID':'" + id + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (response) {
                            ListMyFoodIntake();
                        },
                        error: function (msg) {
                            alert('Can not delete the recipe name: ' + name + '?');
                        }
                    });
                }
            }
            else {

                alert(name);
            }
        }
        //--------------------------End Function DelteReportFoodDrink---------------
        //--------------------------Start Function InsertReportGoals---------------
        function InsertReportGoals() {

            var userid = '<%=Session["Userid"]%>';

            if ($("#txtMyCALORIES").val() == "") {
                $("#txtMyCALORIES").focus();
            }
            else if ($("#txtMyFAT").val() == "") {
                $("#txtMyFAT").focus();
            }
            else if ($("#txtMyCARB").val() == "") {
                $("#txtMyCARB").focus();
            }
            else if ($("#txtMyPROTEIN").val() == "") {
                $("#txtMyPROTEIN").focus();
            }
            else if ($("#txtMYExercise").val() == "") {
                $("#txtMYExercise").focus();
            }
            else if ($("#txtMyWeight").val() == "") {
                $("#txtMyWeight").focus();
            }
            else {

                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/InsertReportGoals",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($(".datepicker").val()) + "','_Calorie':'" + $("#txtMyCALORIES").val() + "','_Fat':'" + $("#txtMyFAT").val()
                     + "','_Carb':'" + $("#txtMyCARB").val() + "','_Protein':'" + $("#txtMyPROTEIN").val() +
                      "','_Weight':'" + $("#txtMyWeight").val() + "','_Exercise':'" + $("#txtMYExercise").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        if (result.d == '10') {
                            alert('This goal is already in system on ' + new Date());
                        }
                        else {
                            ShowMainReport();
                        }
                    },
                    error: function (result) {
                        alert('Can not create goal!');
                    }
                });

            }
        }
        //--------------------------End Function InsertReportGoals-----------------
        //--------------------------Start Function EditReportGoals---------------
        function EditReportGoals() {

            var userid = '<%=Session["Userid"]%>';

            if ($("#txtMyCALORIES").val() == "") {
                $("#txtMyCALORIES").focus();
            }
            else if ($("#txtMyFAT").val() == "") {
                $("#txtMyFAT").focus();
            }
            else if ($("#txtMyCARB").val() == "") {
                $("#txtMyCARB").focus();
            }
            else if ($("#txtMyPROTEIN").val() == "") {
                $("#txtMyPROTEIN").focus();
            }
            else if ($("#txtMYExercise").val() == "") {
                $("#txtMYExercise").focus();
            }
            else if ($("#txtMyWeight").val() == "") {
                $("#txtMyWeight").focus();
            }
            else {

                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/EditReportGoals",
                    data: "{'_UserID':'" + userid + "','_Date':'" + getformatdate($(".datepicker").val()) + "','_Calorie':'" + $("#txtMyCALORIES").val() + "','_Fat':'" + $("#txtMyFAT").val()
                     + "','_Carb':'" + $("#txtMyCARB").val() + "','_Protein':'" + $("#txtMyPROTEIN").val() +
                      "','_Weight':'" + $("#txtMyWeight").val() + "','_Exercise':'" + $("#txtMYExercise").val() + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (result) {
                        ShowMainReport();
                    },
                    error: function (result) {
                        alert('Can not create goal!');
                    }
                });

            }
        }
        //--------------------------End Function EditReportGoals-----------------
        //--------------------------Start Function ShowMainReport------------------
        function ShowMainReport() {
            var userid = '<%=Session["Userid"]%>';
           
            if (userid != null || userid != "") {
                $.ajax({
                    type: "POST",
                    url: "PIMService.asmx/GetShowMainReport",
                    data: "{'UserId':'" + userid + "','Date':'" + getformatdate($(".datepicker").val()) + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (data) {

                        for (var i = 0; i < data.d.length; i++) {
                            if (data.d[i].Name == 'Goal') {
                                $("#txtCalGoals").val(data.d[i].Calorie);
                                $("#txtFatGoals").val(data.d[i].Fat);
                                $("#txtCarbGoals").val(data.d[i].Carb);
                                $("#txtProteinGoals").val(data.d[i].Protein);
                                $("#txExerciseGoals").val(data.d[i].Exercise);
                                $("#txWeightGoals").val(data.d[i].Weight);
                            }
                            else if (data.d[i].Name == 'MyIntake') {
                                $("#txtMyIntakeCal").val(data.d[i].Calorie);
                                $("#txtMyIntakeFat").val(data.d[i].Fat);
                                $("#txtMyIntakeCarb").val(data.d[i].Carb);
                                $("#txtMyIntakeProtein").val(data.d[i].Protein);
                                $("#txtMyIntakeExercise").val(data.d[i].Exercise);
                                $("#txtMyIntakeWeight").val(data.d[i].Weight);
                            }
                        }
                        if (data.d.length == 0) {
                            $("#txtCalGoals").val("");
                            $("#txtFatGoals").val("");
                            $("#txtCarbGoals").val("");
                            $("#txtProteinGoals").val("");
                            $("#txExerciseGoals").val("");
                            $("#txWeightGoals").val("");
                            $("#txtMyIntakeCal").val("");
                            $("#txtMyIntakeFat").val("");
                            $("#txtMyIntakeCarb").val("");
                            $("#txtMyIntakeProtein").val("");
                            $("#txtMyIntakeExercise").val("");
                            $("#txtMyIntakeWeight").val("");
                        }
                        if (data.d.length == 1) {
                            for (var i = 0; i < data.d.length; i++) {
                                if (data.d[i].Name == 'Goal') {
                                    $("#txtCalGoals").val(data.d[i].Calorie);
                                    $("#txtFatGoals").val(data.d[i].Fat);
                                    $("#txtCarbGoals").val(data.d[i].Carb);
                                    $("#txtProteinGoals").val(data.d[i].Protein);
                                    $("#txExerciseGoals").val(data.d[i].Exercise);
                                    $("#txWeightGoals").val(data.d[i].Weight);
                                    $("#txtMyIntakeCal").val("");
                                    $("#txtMyIntakeFat").val("");
                                    $("#txtMyIntakeCarb").val("");
                                    $("#txtMyIntakeProtein").val("");
                                    $("#txtMyIntakeExercise").val("");
                                    $("#txtMyIntakeWeight").val("");
                                }
                                else if (data.d[i].Name == 'MyIntake') {
                                    $("#txtMyIntakeCal").val(data.d[i].Calorie);
                                    $("#txtMyIntakeFat").val(data.d[i].Fat);
                                    $("#txtMyIntakeCarb").val(data.d[i].Carb);
                                    $("#txtMyIntakeProtein").val(data.d[i].Protein);
                                    $("#txtMyIntakeExercise").val(data.d[i].Exercise);
                                    $("#txtMyIntakeWeight").val(data.d[i].Weight);
                                    $("#txtCalGoals").val("");
                                    $("#txtFatGoals").val("");
                                    $("#txtCarbGoals").val("");
                                    $("#txtProteinGoals").val("");
                                    $("#txExerciseGoals").val("");
                                    $("#txWeightGoals").val("");
                                }
                            }
                        }
                        if ($("#txtCalGoals").val() == "" && $("#txtFatGoals").val() == "" && $("#txtCarbGoals").val() == ""
                        && $("#txtProteinGoals").val() == "" && $("#txExerciseGoals").val() == "" && $("#txWeightGoals").val() == "") {
                            $('.btnMyGoals').attr('src', 'images/AddReports.png');
                            $('.idAddGoals').attr('src', 'images/AddReports.png');

                        }
                        else {
                            $('.btnMyGoals').attr('src', 'images/EditReports.png');
                           
                        }

                    },
                    error: function (msg) {

                    }
                });
            }

        }
        //--------------------------End Function ShowMainReport--------------------
        function replaceAll(find, replace, str) {
            while (str.indexOf(find) > -1) {
                str = str.replace(find, replace);
            }
            return str;
        }
        function getformatdate(strdate) {
            var now = new Date(strdate);
            var Month = now.getMonth() + 1;
            var Day = now.getDate();
            var Year = now.getFullYear();

            return Month + '/' + Day + '/' + Year;
        }
    </script>
    

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
     
      <div id="content" class="Main">
        <div class="box_profiles04 clearfix" style="border-top-right-radius:10px;border-top-left-radius:10px">
            <div class="Food" id="idFood" style="float:left;border:0px solid #c1c1c1;width:100px;background-color:#A6A6A6;text-align:center;border-top-left-radius:10px">
               <a href="#"><img src="images/food4.png" class="food3" style="width:85px;height:69px" alt="Food"/> </a>
            </div>
            <div class="Exercise" id="idExercise" style="float:left;border:0px solid #c1c1c1;width:100px;background-color:#A6A6A6;text-align:center"  >
               <a href="#"><img src="images/runing3.png" class="runing3" style="width:85px;height:69px" alt="Exercise"/> </a>
            </div>
            <div class="Weight" id="idWeight" style="float:left;border:0px solid #c1c1c1;width:100px;background-color:#A6A6A6;text-align:center" >
               <a href="#"><img src="images/weight3.png" class="weight3" style="width:85px;height:69px" alt="Weight"/></a>
            </div>
          
               <div class="sharechart" style="float:right">
                <ul style="float:left; width:100%">
                    <li style="float:left; margin-right:5px ">
                        <a id="lnkFacebook" runat="server" target="_blank" >
                           <img id="img1"  width="30" height="30" src="images/icon-fb.png" alt="Facebook" />
                        </a>
                   </li>
                   <li style="float:left; margin-right:5px ">
                       <a id="lnkGoogle" runat="server" target="_blank" >
                           <img src="https://www.gstatic.com/images/icons/gplus-32.png" width="30" height="30"  alt="Share on Google+"/>
                       </a>
                  </li>
                  <li style="float:left;margin-right:5px ">
                      <a id="lnkTwitter" runat="server"  target="_blank">
                          <img src="images/twitter.png" width="30" height="30" />
                      </a>
                  </li>
                  <li  style="float:left;">
                       <a id="lnkEmail" runat="server" target="_blank">
                           <img src="images/mail.png" width="30" height="30" />
                       </a>
                  </li>
               </ul>
            </div>
          
        </div>

        <div class="box_profiles03 clearfix">
            <div  style="float:left;border:0px solid #c1c1c1;width:15%;text-align:right;">
                 &nbsp;
            </div>
            <div  style="float:left;border-right:0px;border-left:0px;width:70%;"   >
              <div style="float:left;border-right:0px;width:30%;text-align:right ">
                    <a href="#"> <img src="images/back.png" class="Back" alt="Back" style="height:28px;width:25px;border:0px;"/></a>
              </div>

              <div style="float:left;border-right:0px;width:40%;" align="center">
                    <input name="datepicker" id="datepicker" class="datepicker" type="text"  size="15"  
                    style="width:100%;background-color:#375D10;color:#ffffff;border:0px;height:28px; vertical-align:top;font-size:12px; text-align: center;"/> 
              </div>

              <div style="float:left;border-right:0px;width:28%;text-align:left">
                   <a href="#"> <img class="Next" src="images/next.png" alt="Next" style="height:28px;width:25px;border:0px;"/></a>
              </div>
                                      
            </div>
           
            <div  style="float:left;border-right:0px;width:13%;text-align:left " >
                &nbsp;
            </div>
        </div>

        <div class="box_profiles03 clearfix">
            <div style="float:left;text-align:right;width:15%;height:100%; margin:0 auto 0 auto;">MY GOALS&nbsp;</div>
            <div class="box_profiles05 clearfix">
                    <div class="box_profiles06">
                        <table border="0" cellspacing="0" cellpadding="0" class="table01">
                          <tr style="background-color:#A6A6A6">
                            <td style="background-color:#A6A6A6;text-align:center;">FOOD - CAL</td>
                            <td style="background-color:#A6A6A6;text-align:center;">FAT</td>
                            <td style="background-color:#A6A6A6;text-align:center;">CARB</td>
                            <td style="background-color:#A6A6A6;text-align:center;">PROTEIN</td>             
                          </tr>
                          <tr >
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtCalGoals">
               		              <input id="txtCalGoals" class="txtCalGoals" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtFatGoals">
               		              <input id="txtFatGoals" class="txtFatGoals"  type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtCarbGoals">
                		            <input id="txtCarbGoals" class="txtCarbGoals" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>   
                            </td>
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtProteinGoals">
                		            <input id="txtProteinGoals"  class="txtProteinGoals" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                          </tr>
                        </table>
                    </div>
                    <div class="box_profiles07">
                      <table border="0" cellspacing="0" cellpadding="0" class="table01">
                          <tr style="background-color:#A6A6A6">               
                            <td style="background-color:#A6A6A6;text-align:center;">EXERCISE</td>          
                          </tr>
                          <tr>
                             <td>
                	            <div class="txt_bg04" id="idtxExerciseGoals">
                		            <input id="txExerciseGoals" class="txExerciseGoals" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                          </tr>    
                        </table>   
                    </div>
                    <div class="box_profiles08">
                       <table border="0" cellspacing="0" cellpadding="0" class="table01">
                          <tr style="background-color:#A6A6A6">               
                            <td style="background-color:#A6A6A6;text-align:center;">WEIGHT</td> 
                          </tr>
                          <tr>
                             <td>
                	            <div class="txt_bg04" id="idtxWeightGoals">
                		            <input id="txWeightGoals" class="txWeightGoals" type="text" style="width: 98%;text-align:center;border:0px;height:30px" value="" disabled="disabled"/>
         			            </div>                
                            </td>                 
                          </tr>
                        </table>
                    </div>
                  </div>
            <div style="float:left;width:13%;height:100%; margin:0 auto 0 auto;">
                    <br/>&nbsp;<a href="#"><img id="btnMyGoals" class="btnMyGoals" src="images/AddReports.png" alt="Add" style="padding:12px 0 0px 0;"/></a>
            </div>
         </div> 

        <div class="box_profiles03 clearfix">
            <div style="float:left;text-align:right;width:15%;height:100%; margin:0 auto 0 auto;">MY INTAKES&nbsp;</div>
            <div class="box_profiles05 clearfix">
                    <div class="box_profiles06">
                        <table border="0" cellspacing="0" cellpadding="0" class="table01">    
                          <tr >
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtMyIntakeCal">
               		              <input id="txtMyIntakeCal" class="txtMyIntakeCal" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtMyIntakeFat">
               		              <input id="txtMyIntakeFat" class="txtMyIntakeFat" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtMyIntakeCarb">
                		            <input id="txtMyIntakeCarb" class="txtMyIntakeCarb" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>   
                            </td>
                            <td style="width:25%">
                	            <div class="txt_bg04" id="idtxtMyIntakeProtein">
                		            <input id="txtMyIntakeProtein" class="txtMyIntakeProtein" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                          </tr>
                        </table>
                    </div>
                    <div class="box_profiles07">
                      <table border="0" cellspacing="0" cellpadding="0" class="table01"> 
                          <tr>
                             <td>
                	            <div class="txt_bg04" id="idtxtMyIntakeExercise">
                		            <input id="txtMyIntakeExercise" class="txtMyIntakeExercise" type="text" value="" style="width: 98%;text-align:center;border:0px;height:30px" disabled="disabled"/>
         			            </div>                
                            </td>
                          </tr>    
                        </table>   
                    </div>
                    <div class="box_profiles08">
                       <table border="0" cellspacing="0" cellpadding="0" class="table01">     
                          <tr>
                             <td>
                	            <div class="txt_bg04"  id="idtxtMyIntakeWeight">
                		            <input id="txtMyIntakeWeight" class="txtMyIntakeWeight" type="text" style="width: 98%;text-align:center;border:0px;height:30px" value="" disabled="disabled"/>
         			            </div>                
                            </td>                 
                          </tr>
                        </table>
                    </div>
                  </div>
            <div style="float:left;width:13%;height:30px;">
                    &nbsp;<a href="#"><img id="btnMyEnter" src="images/AddReports.png" alt="Add" style="padding:12px 0 0px 0;"/></a>
            </div>
         </div> 
          
        <div class="box_profiles04 clearfix">
          <%-- <div style="float:left;text-align:left;width:15%;height:450px; margin:0 auto 0 auto;background:#E9EAED">&nbsp;
               <div  id="ChartDivTemp" style="overflow:scroll;width:150px; height:150px;">
                    	 
               </div>
           </div>--%>
            <div  id="ChartDiv1" class="box_profilesChildren01" style="background:#E9EAED">
	       </div>
           <%-- <div style="float:left;text-align:left;width:15%;height:450px; margin:0 auto 0 auto;background:#E9EAED">&nbsp;
                <div  id="Div2" style="overflow:scroll;width:146px; height:106px;">
                    <img id="dstImg" src=""/>	 
                </div>
            </div>--%>
        </div> 
     </div>
     <div id="content1" class="EnterGoals" style="margin:0 auto 0 auto;border: 0">
        <div id="div1" class="message" style="border: 0">
          <div class="alert-close-goals"><img src="images/ClosePopup.png" alt="Add"/></div>
          <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your goals</div>
          <br />
          <div style="width:100%;height:100%;">
              <div class="box_profiles04 clearfix" style="border:0px"> 
                    <table border="0" cellspacing="0" cellpadding="0" class="table01" style="border-style: solid; border-width: 1px">
                          <tr style="background-color:#A6A6A6;border-style: solid; border-width: 1px">
                            <td style="background-color:#A6A6A6;width:40%;font-weight:normal;border-style: solid; border-width: 1px;height:30px">MY GOALS</td>
                            <td style="background-color:#A6A6A6;width:15%;font-weight:normal;border-style: solid; border-width: 1px;height:30px">CALORIES</td>
                            <td style="background-color:#A6A6A6;width:15%;font-weight:normal;border-style: solid; border-width: 1px;height:30px">FAT</td>
                            <td style="background-color:#A6A6A6;width:15%;font-weight:normal;border-style: solid; border-width: 1px;height:30px">CARB</td>
                            <td style="background-color:#A6A6A6;width:15%;font-weight:normal;border-style: solid; border-width: 1px;height:30px">PROTEIN</td>             
                          </tr>
                          <tr >
                            <td align="right" style="background-color:#E9EAED;border-style: solid; border-width: 1px;">
               		              Food Intake&nbsp;                 
                            </td>
                            <td style="background-color:#ffffff;border-style: solid; border-width: 1px">
               		              <input id="txtMyCALORIES" class="txtMyCALORIES" type="text" tabindex="1" value="" style="width: 98%;height:30px;"/>                
                            </td>
                            <td style="background-color:#ffffff;border-style: solid; border-width: 1px">
               		              <input id="txtMyFAT" class="txtMyFAT" type="text" value="" tabindex="2" style="width:98%;height:30px;"/>           
                            </td>
                            <td style="background-color:#ffffff;border-style: solid; border-width: 1px">
                		            <input id="txtMyCARB" class="txtMyCARB" type="text" value="" tabindex="3" style="width: 98%;height:30px;"/>  
                            </td>
                            <td style="background-color:#ffffff;border-style: solid; border-width: 1px">
                		            <input id="txtMyPROTEIN" class="txtMyPROTEIN" type="text" value="" tabindex="4" style="width: 98%;height:30px;"/>         
                            </td>
                          </tr>
                        </table>
              </div>

              <div class="box_profiles09 clearfix">
                <div style="width:55%;float:left;border:0px;">
                         <table border="0" cellspacing="0" cellpadding="0" class="table01" style="border-style: solid; border-width: 1px">    
                          <tr>
                            <td style="width:73%;border-style: solid; border-width: 1px" align="right">
               		                  Exercise (CAL a day)&nbsp;          
                            </td>
                            <td style="border-style: solid; border-width: 1px">
               		              <input id="txtMYExercise"  class="txtMYExercise" type="text" tabindex="5" value="" style="width: 98%;height:30px"/>             
                            </td>
                           
                          </tr>
                        </table>        
                </div>
              </div>

              <div class="box_profiles09 clearfix">
                <div style="width:55%;float:left;border:0px;">
                         <table border="0" cellspacing="0" cellpadding="0" class="table01" style="border-style: solid; border-width: 1px">    
                          <tr style="border-style: solid; border-width: 1px">
                            <td style="width:73%;border-style: solid; border-width: 1px" align="right">
               		                  Weight by&nbsp;   		                         
                            </td>
                            <td style="border-style: solid; border-width: 1px">
               		              <input id="txtMyWeight" class="txtMyWeight" type="text" value="" tabindex="7" style="width: 98%;height:30px"/>              
                            </td>
                           
                          </tr>
                        </table>        
                </div>
                <div style="vertical-align:middle;padding:3px 0 3px 0;">
                &nbsp;<a href="#"><img id="btnAddGoals" class="btnAddGoals" src="images/AddReports.png" alt="Add" style="visibility:hidden"/></a>
                </div>
              </div>  

          </div>

       </div>
     </div>

     <div id="content2" class="EnterFoodInTakes" style="margin:0 auto 0 auto;border: 0">
        <div id="div3" class="message" style="border: 0">
          <div class="alert-close"><img src="images/ClosePopup.png" alt="Close"/></div>
          <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your food intakes</div>
          <br />
           <div style="width:100%;height:100%;">

              <div class="box_profiles09 clearfix"> 
                    <table cellspacing="0" cellpadding="0" 
                        style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;">    
                          <tr>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:43%;">
               		              
               		                 <input id="txtFoodDrink" class="suggestReport" type="text" placeholder="Enter your intake food/drinks" 
                                     runat="server" value="" style="width: 98%;height:30px;"/>
         			               			                         
                            </td>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:12%">
                	           
               		               <input id="txtQuantity" type="text" class="txtQuantity" placeholder="Quantity" 
                                       runat="server"  value="" style="width: 98%;height:30px;"/>
         			                         
                            </td>
                           
                           <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:20%">
                	               <select id="ddlUnit" 
                                       
                                       style="width: 98%;height:30px;border:none; vertical-align:middle;padding:2px 0 2px 0"></select>                
                            </td>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:20%">
                	                <input name="datepickerFoodDrink" id="datepickerFoodDrink" class="datepicker" 
                                        type="text" value="" style="width: 98%;height:30px;"/>    			                           
                            </td>

                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:5%;vertical-align:middle;text-align:right">
                	            
               		              <a href="#"><img id="idAddFoodDrink" src="images/AddReports.png" alt="Add"/></a>
         			                          
                            </td>
                         </tr>
                        </table>       
              </div>

              <br />

              <div class="box_profiles09 clearfix"> 
                    <table id="idListFoodIntake" style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;">
                        <thead>
                            <tr  class="firstline">
                                <th style="width:44%;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;"></th>
                                <th style="width:15%;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;">FOOD - CALS</th>
                                <th style="width:12%;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;">FAT</th>
                                <th style="width:12%;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;">CARB</th>
                                <th style="width:12%;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;font-weight:normal;">PROTEIN</th>
                                <th style="width:5%;border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;"></th>
                            </tr>
                        </thead>
                        <tbody>
                           
                        </tbody>
                    </table>
              </div>

           </div>
       </div>
     </div>

     <div id="content3" class="EnterWeight" style="margin:0 auto 0 auto;border: 0">
        <div id="div4" class="message" style="border: 0">
          <div class="alert-close"><img src="images/ClosePopup.png" alt="Close"/></div>
          <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your weight</div>
          <br />
           <div style="width:100%;height:100%;">

              <div class="box_profiles09 clearfix"> 
                    <table cellspacing="0" cellpadding="0" 
                        style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;">    
                          <tr>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:50%">  
               		                 <input id="txtWeightLbs" class="txtWeightLbs" type="text" placeholder="Enter your weight" runat="server" value="" style="width: 98%;height:30px"/>   			                         
                            </td>
                            
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:15%">
                	                 <input name="datepickerExercise" id="datepickerWeight"  class="datepicker" type="text" value="" style="width: 98%;height:30px"/>            
                            </td>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:5%;vertical-align:middle;text-align:right">
               		              <a href="#"><img id="idAddWeight" src="images/AddReports.png" alt="Add"/></a>           
                            </td>
                         </tr>
                        </table>       
              </div>
              <br />

              <div class="box_profiles09 clearfix"> 
                    <table id="idListEnterWeight" style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;" class="table01">   
                        <tbody>
                            
                        </tbody>
                    </table>
              </div>
           </div>
       </div>
     </div>

     <div id="content4" class="EnterExercise" style="margin:0 auto 0 auto;border: 0">
        <div id="div5" class="message" style="border: 0">
          <div class="alert-close"><img src="images/ClosePopup.png" alt="Close"/></div>
          <br />
          <div style="width:100%;height:100%;text-align:center;font-family:Arial, Helvetica, sans-serif;font-weight:normal;font-size:20px">Enter your exercises</div>
          <br />
           <div style="width:100%;height:100%;">

              <div class="box_profiles09 clearfix"> 
                    <table cellspacing="0" cellpadding="0" 
                        style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;">    
                          <tr>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:45%">
               		              
               		                 <input id="txtExerciseName" type="text" placeholder="Enter your exercises" runat="server" style="width: 98%;height:30px"/>
         			               			                         
                            </td>
                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:20%">
                	           
               		               <input id="txtExerciseCal" class="txtExerciseCal" type="text" value="" placeholder="Calories" runat="server" style="width: 98%;height:30px"/>                
                            </td>

                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:20%">
               		                <input name="datepickerExercise" id="datepickerExercise"  class="datepicker" type="text" value="" style="width: 98%;height:30px"/>         
                            </td>

                            <td style="border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;width:5%;vertical-align:middle;text-align:right">
                	            
               		              <a href="#"><img id="idAddExercise" src="images/AddReports.png" alt="Add"/></a>
         			                          
                            </td>
                         </tr>
                        </table>       
              </div>

              <br />

              <div class="box_profiles09 clearfix"> 
                    <table id="idListEnterExercise" style='border-bottom: 1px solid black;border-top: 1px solid black;border-left:none;border-right:none; 
                        border-style: solid; border-width: 1px 0px 1px 0px;' class="table01">   
                        <tbody>
                          
                        </tbody>
                    </table>
              </div>
           </div>
       </div>
     </div>

   


</asp:Content>

